﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class TestImage : MonoBehaviour {

	// Use this for initialization
	void Start () {
		Debug.LogWarning ("TestImage start");
		Image image = GetComponent<Image> ();
		Sprite tex = Resources.Load ("RoomImage/bedroom") as Sprite;
		if (tex == null)
			Debug.LogWarning ("tex is null");
		/*
		Debug.LogWarning (tex.format);
		Sprite sprite = Sprite.Create (tex, new Rect (0f, 0f, 300f, 200f), new Vector2 (0.5f, 0.5f));
		if (sprite == null)
			Debug.LogWarning ("sprite is null");
			*/
		image.sprite = tex;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
